<?php
use yii\bootstrap\ActiveForm;
?>
<link rel="stylesheet" href="../static/dist/css/AdminLTE.min.css" type="text/css">
<link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/datatables/jquery.dataTables.css" type="text/css">
<link rel="stylesheet" href="../static/css/admin.css" type="text/css">
<link rel="stylesheet" href="../static/jBox/Skins/Metro/jbox.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/daterangepicker/daterangepicker.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/datepicker/datepicker3.css" type="text/css">

<style>
    .dataTables_length{
        margin-top: 10px;
    }
    .dataTable>tbody>tr>td{
        vertical-align: middle;
        font-size: 0.8em;
        padding: 8px 18px;
    }
    .dataTable>thead>tr>th{
        vertical-align: middle;
        font-size: 0.8em;
    }
	.input_search_width{ width: 10%}
	.form-group_add{ width: 40%; float: left; margin: 0px 5%;}
	.form-group .item_label {
		display:block;
		width: 5rem;
	}
	.form-group .item {
		display:block;
		width:100%;
		height: 2.7rem;
		line-height: 2.7rem;
		border:  1px solid #ccc;
		padding: 0 .86rem;
		border-radius: 4px;
		margin-right: .6rem;
		-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
		box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
		-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
		-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
		transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
	}

	.form-group .item select {
		margin-top: 0.3rem;
		width:99%;
		border: none;
	}
	.form-group .item select option {
		text-align: center;
	}
	.form-group .user_both select {
		width: 62% !important;
	}
	/*add by allen.qiang 20180130 优化会员查询页面布局 start*/
	#table_id_example th, td {
		white-space: nowrap;
	}
	/*add by allen.qiang 20180130 优化会员查询页面布局 end*/
</style>
<div class="tabs-panel">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <!--<h3 class="box-title">Hover Data Table</h3>-->
					会员卡号: <input class="depart-input input_search_width" name="member_no" id="member_no" type="text" placeholder="">
					会员姓名: <input class="depart-input input_search_width" name="member_name" id="member_name" type="text" placeholder="">
					手机号: <input class="depart-input input_search_width" name="mobile" id="mobile" type="text" placeholder="">
					注册日期：<input class="depart-input" name="reservationtime" id="reservationtime" type="text" placeholder="" style="width: 270px">
                    <button type="button" class="btn btn-primary depart-modal" id="select_button" style="width: 100px;">查询</button> &nbsp;
                    <button type="button" class="btn btn-warning depart-modal" id="reset_button" style="width: 100px;">重置</button>
                    <!--部门:<select name="dept_id" id="dept_id"></select>-->
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <table id="table_id_example" class="display">
                        <thead>
							<tr>
								<!--add by allen.qiang 20180130 优化会员查询页面布局  start-->
								<th style="width: 25%">操作</th>
								<th style="width: 5%">会员名称</th>
								<th style="width: 5%">会员卡号</th>
								<th style="width: 10%">手机（线上数据）</th>
								<th style="width: 10%">性别</th>
								<th style="width: 10%">邮件</th>
								<th style="width: 10%">生日</th>
								<th style="width: 5%">累计消费</th>
								<th style="width: 10%">当前积分</th>
								<th style="width: 10%">会员来源</th>
								<!--add by allen.qiang 20180130 优化会员查询页面布局  end-->
							</tr>
						</thead>
						<tbody>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<!--編輯会员中心-->
<div class="modal fade" id="usercenter-modal" style="background: rgba(236, 230, 230, 0.3);" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width: 50%;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">修改会员基本资料</h4>
			</div>
			<div class="modal-body">
				<form action="/cust/update-cust-master" method="post" name="usercenter" id="update_cust_master">
					<div class="box-body">
						<div class="form-group form-group_add">
							<label for="tag_group_id_add"><span class="text-danger">* </span>会员卡号</label>
							<input style="width: 100%;" class="form-control" disabled name="member_no_disabled" id="member_no_disabled" value=""  type="text">
							<input class="form-control" id="form_member_no" name="member_no" value=""  type="hidden">
						</div>

						<div class="form-group form-group_add">
							<label for="tag_group_id_add"><span class="text-danger">* </span>手机号</label>
							<input style="width:100%;" class="form-control"  id="form_mobile" value=""  placeholder="请输入手机号" name="mobile"  type="text">
						</div>

						<div class="form-group form-group_add">
							<label for="tag_group_id_add"><span class="text-danger">* </span>会员姓名</label>
							<input style="width:100%;" class="form-control" name="username" id="from_username" placeholder="会员姓名" type="text">
						</div>
						<div class="form-group form-group_add">
							<label for="tag_group_id_add"><span class="text-danger">* </span>性别</label>
							<select name="sex" id="form_sex" style="width: 100%;"  class="form-control">
								<option value="<?=\common\models\CustMaster::USER_SEX_MAN?>">男</option>
								<option value="<?=\common\models\CustMaster::USER_SEX_WENMAN?>">女</option>
							</select>
						</div>

						<div class="form-group form-group_add">
							<label class="item_label" for="tag_group_id_add"><span class="text-danger">* </span>省市区</label>
							<?= \common\widgets\SysCity::widget([]) ?>
						</div>

						<div class="form-group form-group_add">
							<label for="tag_group_id_add"><span class="text-danger">* </span>生日</label>
							<input style="width:100%;" class="form-control" name="birthday" id="from_birthday" placeholder="生日" type="text">
						</div>

						<div class="form-group form-group_add">
							<label for="tag_group_id_add"><span class="text-danger">* </span>地址</label>
							<input style="width:100%;" class="form-control" name="adddress" id="from_adddress" placeholder="地址" type="text">
						</div>

						<div class="form-group form-group_add">
							<label for="tag_group_id_add"><span class="text-danger">* </span>电子邮箱</label>
							<input style="width:100%;" class="form-control" name="email" id="from_email" placeholder="电子邮箱" type="text">
						</div>
						<input class="form-control" id="form_province_name" name="province_name" value=""  type="hidden">
						<input class="form-control" id="form_city_name" name="city_name" value=""  type="hidden">
						<input class="form-control" id="form_district_name" name="district_name" value=""  type="hidden">
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<a type="button" class="btn btn-primary ajax_post_update">提交</a>
			</div>
		</div>
	</div>
</div>
<!--手工重置密码-->
<div class="modal fade" id="userresetpass-modal" style="background: rgba(236, 230, 230, 0.3);" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width: 25%;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">重置密码</h4>
			</div>
			<div class="modal-body">
				<form action="/cust/reset-password" method="post" name="reset_password" id="reset_password">
					<div class="box-body">
						<div class="form-group">
							<label for="tag_group_id_add"><span class="text-danger">* </span>新密码</label>
							<input style="width: 100%;" class="form-control" id="frompassword_pwd" name="pwd" placeholder="新密码" type="text">
						</div>
						<div class="form-group">
							<label for="tag_group_id_add"><span class="text-danger">* </span>重复新密码</label>
							<input style="width: 100%;" class="form-control" name="rePwd" id="frompassword_rePwd" placeholder="重复新密码" type="text">
						</div>
						<div class="form-group">
							<p class="text-danger">温馨提示：您操作设置新密码后，请电话告诉客户</p>
						</div>
						<input name="mobile" type="hidden" id="frompassword_mobile">
					</div>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<a type="button" class="btn btn-primary ajax_post_password">提交</a>
				</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript" src="../static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="../static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../static/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="../static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="../static/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="../static/jBox/i18n/jquery.jBox-zh-CN.js"></script>
<script type="text/javascript" src="../static/plugins/jquery.form.js"></script>
<script type="text/javascript" src="../static/plugins/layer/layer.js"></script>
<script type="text/javascript" src="../static/plugins/moment/moment.min.js"></script>
<script type="text/javascript" src="../static/plugins/daterangepicker/daterangepicker.js"></script>
<script type="text/javascript" src="../static/plugins/datepicker/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="../static/app/cust/index.js?version=<?=Yii::$app->params['version']?>"></script>
<script type="text/javascript">var sys_city	= <?=$sysCity?>;</script>